<script>
    $(document).ready(function(){
    $('.loading').fadeOut();
    $.get('/accounts/permission/user_permission/',function(data){
        if (data) {
            var obj = data.split(",");
            for (var i=0;i<obj.length;i++){
                document.getElementById(obj[i]).style.display = "block";
            }
        }
    });
});
</script>
<aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
    <div style="height: 60px">

    </div>
      <!-- Sidebar user panel (optional) -->
      <!-- /.search form -->

      <!-- Sidebar Menu -->

      <ul class="sidebar-menu" id="sidebar-menu">
{#        <li class="header">HEADER</li>#}
        <!-- Optionally, you can add icons to the links -->
{#        <li><a href="{% url 'index' %}"><i class="fa fa-dashboard"></i> <span>首页面板</span></a></li>#}
          {% if request.user.is_superuser %}
        <li id="navi"><a href="{% url 'navi' %}"><i class="fa fa-link"></i> <span>站点导航</span></a></li>
        <li id="cmdb"><a href="{% url 'cmdb' %}"><i class="fa fa-database"></i> <span>资产管理</span></a></li>
        <li id="appconf"><a href="{% url 'appconf' %}"><i class="fa fa-outdent"></i> <span>应用管理</span></a></li>
        <li id="branches"><a href="{% url 'branches' %}"><i class="fa fa-building"></i> <span>分支管理</span></a></li>
        <li id="setup"><a href="{% url 'job_list' %}"><i class="fa fa-cogs"></i> <span>任务编排</span></a></li>
        <li id="delivery"><a href="{% url 'delivery' %}"><i class="fa fa-retweet"></i> <span>持续交付</span></a></li>
        <li id="monitor"><a href="{% url 'monitor' %}"><i class="fa fa-television"></i> <span>监控平台</span></a></li>
        <li id="mfile"><a href="{% url 'mfile' %}"><i class="fa fa-folder-open"></i> <span>文件管理</span></a></li>
        <li id="accounts"><a href="{% url 'user_list' %}"><i class="fa fa-users"></i> <span>用户管理</span></a></li>
        <li id="config"><a href="{% url 'config' %}"><i class="fa fa fa-cog"></i> <span>系统配置</span></a></li>
        {% else %}
        <li id="navi" style="display: none"><a href="{% url 'navi' %}"><i class="fa fa-link"></i> <span>站点导航</span></a></li>
        <li id="cmdb" style="display: none"><a href="{% url 'cmdb' %}"><i class="fa fa-database"></i> <span>资产管理</span></a></li>
        <li id="appconf" style="display: none"><a href="{% url 'appconf' %}"><i class="fa fa-outdent"></i> <span>应用管理</span></a></li>
        <li id="branches" style="display: none"><a href="{% url 'branches' %}"><i class="fa fa-building"></i> <span>分支管理</span></a></li>
        <li id="setup" style="display: none"><a href="{% url 'job_list' %}"><i class="fa fa-cogs"></i> <span>任务编排</span></a></li>
        <li id="delivery" style="display: none"><a href="{% url 'delivery' %}"><i class="fa fa-retweet"></i> <span>持续交付</span></a></li>
        <li id="monitor" style="display: none"><a href="{% url 'monitor' %}"><i class="fa fa-television"></i> <span>监控平台</span></a></li>
        <li id="mfile" style="display: none"><a href="{% url 'mfile' %}"><i class="fa fa-folder-open"></i> <span>文件管理</span></a></li>
        <li id="accounts" style="display: none"><a href="{% url 'user_list' %}"><i class="fa fa-users"></i> <span>用户管理</span></a></li>
        <li id="config" style="display: none"><a href="{% url 'config' %}"><i class="fa fa fa-cog"></i> <span>系统配置</span></a></li>
          {% endif %}
      </ul>
      <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
  </aside>